
var api = require('../../utils/api.js');
var app = getApp();
Page({
    data: {
        tophe:0,
        photo:[]
    },
    currentPageNumber: 1,
        onLoad() {
        var file=api.FIlE;
        this.setData({
            bg:file
        })
       
    },
    onShow() {
        let jn = wx.getMenuButtonBoundingClientRect();

        console.log(jn);
        var tophe=jn.top+jn.height+25;
        this.setData({
            tophe:tophe+'px',
            over:jn.top
        })
        this.getallphoto();

    },

    back(){
        wx.navigateBack()
    },
    getallphoto(){

        var that=this;
        api.post({
            url: 'photo/getallphoto',
            data: {},
            success: data => {
                that.setData({
                    photo:data.data
                })
            },
        });

    },
    seeinfo(ret){
        console.log(ret);
        var id=ret.currentTarget.dataset.id;
        wx.navigateTo({
          url: '/pages/photo/info?id='+id
        })

    }


});
